package com.chengqj.observer.listener.event;

import java.lang.reflect.Method;

/**
 * @program: pattern
 * @description: 测试
 * @author: chengqj
 * @create: 2018-08-03 11:54
 **/
public class Client {
    public static void main(String[] args) throws NoSuchMethodException {
        Observer observer = new ConreateObserver();
        Subject subject = new Subject();
        subject.addListener(SubjectEventType.ON_ADD,observer,observer.getClass().getMethod("update"));
        subject.add();
    }
}
